package org.example.common.validate.annotation;

import org.example.common.validate.SexValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author lsliang
 */
@Documented
@Constraint(validatedBy = SexValidator.class)
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
public @interface Sex {

    String message() default "sex format is error!";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
